﻿Shader "Custom/TestShaderLab" {
	Properties {
		_Color ("Color", Color) = (1,1,1,1)
		_Ambient("Ambient",color) = (0.3,0.3,0.3,0.3)
		_Specular("Specular",color) = (0.3,0.3,0.3,0.3)
		_shininess ("Shininess", Range(0,8)) = 0.5
		_Emission ("Emission",color) = (0.3,0.3,0.3,0.3)
		_MainTex ("MainTex (RGB)", 2D) = "white" {}
		_MainTex2 ("MainTex2 (RGB)", 2D) = "white" {}
		_Constant ("Constant",color) = (0.3,0.3,0.3,0.3)
	//	_Glossiness ("Smoothness", Range(0,1)) = 0.5
	//	_Metallic ("Metallic", Range(0,1)) = 0.0
	}
	SubShader {
		Tags{"Queue"="Transparent"}
		pass{
		 //color[_Color]
		    Blend SrcAlpha OneMinusSrcAlpha
			 material
			 {
			 	Diffuse[_Color] //默认颜色
			 	ambient[_Ambient] //光照颜色
			 	specular[_Specular]//高光颜色
			 	shininess[_shininess]//光照范围
			 	emission[_Emission]//自发光颜色
			 }
			 Lighting On
			 separatespecular on
			 
			settexture[_MainTex]
			{
				combine texture * primary double  //primary出自光照颜色计算或者它绑定的顶点颜色
			}
			
			settexture[_MainTex2]
			{
				constantColor[_Constant]
				combine texture * previous ,constant  //previous前一个settexture 的结果
			}
		}
	} 
	FallBack "Diffuse"
}
